package de.nak.roommgmt.action;

import java.util.List;

import org.apache.struts.action.ActionForm;

import de.nak.roommgmt.model.Room;

/**
 * Action form containing the list of rooms.
 * 
 * @author Stephan Anft
 */
@SuppressWarnings("serial")
public class RoomForm extends ActionForm {
	/** Attribute containing the selected key. */
	private Long selectedKey;
	/** The list containing all rooms. */
	private List<Room> rooms;
	/** The current room. */
	private Room room;
	
	/**
	 * Returns the selected room id.
	 * @return a Long value.
	 */
	public Long getSelectedKey() {
		return selectedKey;
	}

	/**
	 * Sets the selected room id.
	 * @param selectedKey The value to set.
	 */
	public void setSelectedKey(Long selectedKey) {
		this.selectedKey = selectedKey;
	}

	/**
	 * Returns the list of rooms.
	 * @return the room list.
	 */
	public List<Room> getRooms() {
		return rooms;
	}
	
	/**
	 * Sets the list of rooms.
	 * @param rooms the room list to set.
	 */
	public void setRooms(List<Room> rooms) {
		this.rooms = rooms;
	}

	/**
	 * Returns the current room.
	 * @return the room.
	 */
	public Room getRoom() {
		return room;
	}

	/**
	 * Sets the current room.
	 * @param room the room to set.
	 */
	public void setRoom(Room room) {
		this.room = room;
	}
	
	
}
